<link rel="stylesheet" href="assets/galleriffic/css/galleriffic-2.css" type="text/css" />
<script type="text/javascript" src="assets/galleriffic/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="assets/galleriffic/js/jquery.galleriffic.js"></script>
<script type="text/javascript" src="assets/galleriffic/js/jquery.opacityrollover.js"></script>
<!-- We only want the thunbnails to display when javascript is disabled -->
<script type="text/javascript">
	document.write('<style>.noscript { display: none; }</style>');
</script>

        <div id="slide" >
		<script type="text/javascript">
			document.write('<style>.noscript { display: none; }</style>');
		</script>
				<!-- Start Advanced Gallery Html Containers -->
					<div id="thumbs" class="navigation" style="width: 100px; float: left; opacity: 1;">
					<ul class="thumbs noscript">
<?php 
	$html="";
	if($result->image1!="")
	{						
		$html .= "<li>			
			<a class='thumb' name='leaf' href='uploads/girl/".$result->image1."' >
			<img src='uploads/girl/".$result->image1."' width='60' height='60' border='0' /></a>
			</li>";
	}
	if($result->image2!="")
	{						
		$html .= "<li>			
			<a class='thumb' name='leaf' href='uploads/girl/".$result->image2."' >
			<img src='uploads/girl/".$result->image2."' width='60' height='60' border='0' /></a>
			</li>";
	}
	if($result->image3!="")
	{						
		$html .= "<li>			
			<a class='thumb' name='leaf' href='uploads/girl/".$result->image3."' >
			<img src='uploads/girl/".$result->image3."' width='60' height='60' border='0' /></a>
			</li>";
	}
	if($result->image4!="")
	{						
		$html .= "<li>			
			<a class='thumb' name='leaf' href='uploads/girl/".$result->image4."' >
			<img src='uploads/girl/".$result->image4."' width='60' height='60' border='0' /></a>
			</li>";
	}
	echo $html;
?>
					</ul>
				</div>
				<div id="gallery" class="content">
					<div class="slideshow-container">
						<div id="loading" class="loader"></div>
						<div id="slideshow" class="slideshow"></div>
					</div>
				</div>
			
		<script type="text/javascript">
			jQuery(document).ready(function($) {
				// We only want these styles applied when javascript is enabled
				$('div.navigation').css({'width' : '100px', 'float' : 'left', 'margin-left':'20px'});
				$('div.content').css('display', 'block');

				// Initially set opacity on thumbs and add
				// additional styling for hover effect on thumbs
				var onMouseOutOpacity = 0.67;
				$('#thumbs ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				var gallery = $('#thumbs').galleriffic({
					delay:                     2500,
					numThumbs:                 15,
					preloadAhead:              10,
					enableTopPager:            true,
					enableBottomPager:         true,
					maxPagesToShow:            7,
					imageContainerSel:         '#slideshow',
					controlsContainerSel:      '#controls',
					captionContainerSel:       '#caption',
					loadingContainerSel:       '#loading',
					renderSSControls:          true,
					renderNavControls:         true,
					playLinkText:              'Play Slideshow',
					pauseLinkText:             'Pause Slideshow',
					prevLinkText:              '&lsaquo; Previous Photo',
					nextLinkText:              'Next Photo &rsaquo;',
					nextPageLinkText:          'Next &rsaquo;',
					prevPageLinkText:          '&lsaquo; Prev',
					enableHistory:             false,
					autoStart:                 true,
					syncTransitions:           true,
					defaultTransitionDuration: 900,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});
			});
		</script>
	<div class="caption" >	
		
		<div class="title">
<?php
	if($result->name!="")
	{
		echo $result->name;
	}
?>
		</div>
		<div style="margin-top: 5px;">
			<div class="lable" style="float:left;;">
				Ngày sinh:
			</div>
			<div style="margin-left:5px;">
<?php
	if($result->birthday!=0)
	{
		
		echo date('Y-m-d',$result->birthday);
	}
?>
			</div>
		</div>
		<div style="margin-top: 5px;">
			<div class="lable" style="float:left">
				Sở thích:
			</div>
			<div style="margin-left:5px;">
<?php
	if($result->interests!="")
	{
		echo $result->interests;
	}
?>
			</div>
		</div>
		<div style="margin-top: 5px;">
			<div class="lable" style="float:left">
				Năng khiếu:
			</div>
			<div style="margin-left:5px;">
<?php
	if($result->talent!="")
	{
		echo $result->talent;
	}
?>
			</div>
		</div>
		<div style="margin-top: 5px;">
			<div class="lable" style="float:left">
				Giới thiệu:
			</div>
			<div style="margin-left:5px;">
<?php
	if($result->description!="")
	{
		echo $result->description;
	}
    else
    {
        echo "";
    }
?>
			</div>
		</div>
		
        
        	<div style="margin-top: 5px;">
			<div class="lable" style="float:left">
				Số lượt bình chọn:
			</div>
			<div style="margin-left:5px;">
                <?php
                	if($count_girl_vote!=0)
                	{
                		echo $count_girl_vote;
                	}
                ?>
			</div>
		</div>
	</div>
	<div id="action" >
		<div id="vote" >
        
        <script>
        function url_current() {
            var base_url = window.location.origin;
        
            var url = window.location.href;
            pathArray = url.split('/');
            protocol = pathArray[0];
            host = pathArray[2];
            var url = "";
            for (var i = 0; i < 4; i++) {
        
                url += pathArray[i] + "/";
            }
        
            // return window.location.href;
            return url;
        }
        jQuery(function ($) {
           $("#vote_summit").click(function () { // triggred click
              
              $.post(url_current() + "vote"
               , function (value) {
                    if(value>0)
                    {
                            window.location = url_current()+"allbum?gid="+value;
                    }
                    else if (value == -3) {
                       alert("Số lượt vote đã hết");
                       //$("#vote_summit").prop("disabled", false);
                       return false;
                   }
                    else if (value == -2) {
                       alert("Bạn chưa đăng nhập để bình chọn");
                       //$("#vote_summit").prop("disabled", false);
                       return false;
                   }
                   else{
                       alert(value);
                   }
               });
            });
            });
        </script>
        
		<a  id="vote_summit" > 
		<?php 
        if(isset($vote))
        {
            	if($vote==1)
			{
		?>
				<div id="img_unvote"  ></div>
		<?php
		}
		else
		{
		?>
			<div id="img_vote"  ></div>
		<?php
		}	
        }
        else
        	{
		?>
			<div id="img_vote"  ></div>
		<?php
		}
			
		?>
			
		</a>
		</div>
		<div id="facebook" >
		<a href="https://www.facebook.com/pages/Game-One-Piece-Online/1525612281003561"  > 
			<div id="img_facebook" ></div>
		</a>
		</div>
	</div>
     </div>
